CC		= gcc
WARNINGS	= -Wall
COMPILE		= -pipe -O3 -lpthread -g 
PROC_OPT        = -march=x86-64

CFLAGS = $(WARNINGS) $(COMPILE) $(PROC_OPT)
SRCS    = fifo.c scheduler.c
HEADERS = fifo.h scheduler.h

_OBJ  = $(SRCS:.c=.o)
ODIR  = objs
OBJS  = $(patsubst %,$(ODIR)/%,$(_OBJ))

scheduler : $(OBJS) $(HEADERS)
	$(CC) $(CFLAGS) $(OBJS) -o $@

$(ODIR)/%.o : %.c $(HEADERS)
	$(CC) $(CFLAGS) -c $< -o $@

.PHONY: clean

clean:
	rm -f objs/*.o scheduler *~
